home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / ANTENNA / AZPRJ104 / AZ.NR < prev    next >
Encoding:
Text File  |  1995-07-19  |  10.1 KB  |  264 lines

  1.  
  2.  (text from the Central States VHF Soc abstracts, 1994                    
  3.  
  4.  
  5.  
  6.  
  7.            az_proj.ps - A program to create azimuthal equidistant
  8.                                map projections
  9.  
  10.       Joseph Mack (NA3T) and Michael Katzmann (NV3Z / VK2BEA / G4NYV) *
  11.  
  12.  
  13.  
  14.    Abstract
  15.  
  16.         The azimuthal equidistant, or 'great circle' map  projection  is  a
  17.    useful  tool  for  the  radio amateur in quickly determining the correct
  18.    direction to point antennas between two points on  the  surface  of  the
  19.    earth.  Unlike  conventional maps, that attempt to maintain the shape of
  20.    surface features, the azimuthal projection maintains only the  direction
  21.    and  distance  from a single site. The map, consequently, is only useful
  22.    for that site.
  23.  
  24.         It was felt that a simple, inexpensive method for the individual to
  25.    create their own azimuthal projections was desirable. The flexibility to
  26.    customize the map, in order to show a particular area  of  interest  and
  27.    include  features  required  by the user, were of prime importance.  The
  28.    criteria of simplicity, and  non-dependence  on  specific  hardware  and
  29.    software  were  the  principle  motives  in choosing the Postscript page
  30.    description language to implement this idea.
  31.  
  32.  
  33.    Capabilities
  34.  
  35.         The program is capable of displaying a map from almost any point on
  36.    the  earth  at  any scale. The map may be offset, so that an area can be
  37.    enlarged without having to include the base site. Thus a  map  based  on
  38.    Washington  DC  has  the ability to show, for example, only Europe. Grid
  39.    squares, based on the Maidenhead system, may be overlayed on the map  at
  40.    the  discretion  of  the  user. Likewise compass bearings are optionally
  41.    available.  Facilities have been included to print either  callsigns  or
  42.    country  names from a standard file of DXCC callsigns available from the
  43.    ARRL bulletin board.  Labels  may  be  added  to  the  map  to  indicate
  44.    features at the discretion of the user. One use of this might be to pro-
  45.    duce a local repeater or beacon map.
  46.  
  47.         All of the program and data files in this package are freely redis-
  48.    tributable.   The  main  map data is derived from the C.I.A. world data-
  49.    base. It has a resolution of between 50 and 100 metres. Maps can thus be
  50.    produced  of quite small areas whilst retaining reasonable detail. Coun-
  51.    try borders, major rivers and lakes, islands and U.S., Canadian and Aus-
  52.    tralian states are included in the database. There is approximately four
  53.    megabytes of ascii data files, split into continents.
  54.  
  55.    ________
  56.      *
  57.        Joseph Mack.      (301) 402-4573 (Work)   Internet: mack@ncifcrf.gov
  58.        Michael Katzmann. (410) 721-5151 (Work)   Internet: michael%vk2bea@secondsource.COM
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.     NV3Z & NA3T            Azimuthal Map Projections                 Page 2
  71.  
  72.  
  73.    Implementation
  74.  
  75.         Postscript is a programming language developed by Adobe Systems for
  76.    use in desktop publishing. It is a page description language. That is to
  77.    say, one uses instructions to tell the device how to print characters or
  78.    figures  on  the  page. A Postscript printer differs from a conventional
  79.    printer in that you must send it not just the text you want printed, but
  80.    a  program that tells the printer how the text or data received is to be
  81.    interpreted.  Postscript is  a  stack  orientated  language,  much  like
  82.    Forth,  and  its  operation  is somewhat analogous to an RPN calculator.
  83.    Data is pushed on the stack (last in first out) and then  operated  upon
  84.    by   a   function.   The  az_proj.ps  program  is  entirely  written  in
  85.    Postscript, so that with a  Postscript  capable  printer,  all  that  is
  86.    required to create a map is to customize the program options and send it
  87.    (azproj.ps) and the data files to the printer. It is the  printer,  not
  88.    the  computer  that  executes the program, transforming the latitude and
  89.    longitude information from the data files into bearing and distance, and
  90.    then  drawing  the  map.  In that sense the program is computer indepen-
  91.    dent, since the only purpose of the computer is to store the plain ASCII
  92.    files.
  93.  
  94.  
  95.  
  96.    ...but I don't have a Postscript printer!
  97.  
  98.         If your printer doesn't understand Postscript, it  is  still  quite
  99.    likely   that  you  can  use  this  program.  A  freely  redistributable
  100.    Postscript interpreter is available that supports a myriad  of  printers
  101.    and  display  devices.  This  program  is Ghostscript and is distributed
  102.    under the terms of the GNU  public  license.  It  runs  on  MS-DOS,  MS-
  103.    Windows,  Unix,  VMS  and  other  systems.   Ghostscript  interprets the
  104.    Postscript code and creates a bitmap that is printed or displayed. Under
  105.    this  arrangement,  the program is executed by the host computer, and it
  106.    is the printer that is the 'dumb' recipient of the bitmap.
  107.  
  108.         Printer drivers for HP deskjet and paintjet  series,  HP  laserjet,
  109.    Cannon   bubblejet,   Epson   dot  matrix  and  others  are  built  into
  110.    Ghostscript. Video display  drivers,  which  render  Postscript  on  the
  111.    screen,  are  present for VGA, super VGA, MS-windows, the X Windows sys-
  112.    tem, GIF and PCX formats. This is an ideal way to preview  the  program,
  113.    to ensure that the output is what you expect, even if you actually print
  114.    it on a Postscript printer.  If you have a fast  computer,  Ghostscript*
  115.    will  probably  give  you  better performance than a Postscript printer.
  116.    Postscript printers rarely have floating point math hardware  installed,
  117.    which speeds the execution of this program greatly. An Intel 486/66 pro-
  118.    cessor is 18 times faster than an HP1200C/PS Postscript printer in  exe-
  119.    cuting this program.
  120.    ________
  121.      * Ghostscript is freely available (with the GNU License), on the
  122.        internet from ftp.cs.wisc.edu:/pub/ghost, and from the GNU servers
  123.        everywhere.
  124.        Ghostscript is Copyright Aladdin Enterprises.
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.     NV3Z & NA3T            Azimuthal Map Projections                 Page 3
  137.  
  138.  
  139.    Customizations
  140.  
  141.         The program has been designed to allow easy modification, in  order
  142.    to  tailor  the map to the user's preferences. Those parameters that are
  143.    most often changed, are clustered in the 'options' array.   These  vari-
  144.    ables are:
  145.  
  146.       o latitude and longitude of the QTH, (the position that the  distance
  147.         and bearing is referenced to)
  148.  
  149.       o latitude and longitude of the center of the map, (the center of the
  150.         map does not need to be the same as the QTH)
  151.  
  152.       o scale of the map in either km:cm or degrees  of  solid  angle  sub-
  153.         tended  from  the  center  of the earth (each degree is 60 nautical
  154.         miles)
  155.  
  156.       o title of the map
  157.  
  158.       o enable printing of lettered Maidenhead grid square boundaries
  159.  
  160.       o enable printing of lettered Maidenhead designators
  161.  
  162.       o enable printing of numbered Maidenhead grid square boundaries
  163.  
  164.       o enable printing of numbered Maidenhead designators
  165.  
  166.       o enable printing of compass bearing lines
  167.  
  168.       o enable printing of distance circle
  169.  
  170.       o enable printing of outer bearing circle
  171.  
  172.       o if DXCC data file supplied, print either callsign or country name
  173.  
  174.    The options array for a map of the continental US, based on Greenbelt MD
  175.    but centered on the mid west, would be configured as follows:
  176.    /options
  177.    [
  178.        39.0        -76.845         (WA3NAN - NASA Goddard)
  179.        40          -89             true    % The midwest & enable offset
  180.        200         true                    % scale, km/cm (degrees),
  181.        true                                % landscape (portrait)
  182.        on          on                      % letter grid squares, labels
  183.        on          on                      % number grid squares, labels
  184.        on                                  % compass circumference,
  185.        on          off                     % compass radial spokes, outerborder
  186.        true                                % callsigns (country name)
  187.    ] def
  188.  
  189.    A comment in Postscript is preceded by  a  '%',  thus  we  are  able  to
  190.    include  some explanation with each variable.  Other standard Postscript
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.     NV3Z & NA3T            Azimuthal Map Projections                 Page 4
  203.  
  204.  
  205.    variables can be modified to change color,  line  thickness,  fonts  and
  206.    font  sizes.  These  are  heavily  sign-posted  throughout the code, and
  207.    should be obvious to non-Postscript programmers.  Colors for the various
  208.    features  are  defined  in  terms  of  R  G  B values from 0 (dark) to 1
  209.    (bright). For example we define a variable lightred as:
  210.    /lightred      { 1.0 0.33 0.33  }  def
  211.  
  212.    We can use this later to define the color of, say, our grid square boun-
  213.    daries.
  214.    /grid_locator_letter_color      /lightred cvx   def
  215.  
  216.    In Postscript a variable name is preceded by a '/'. The def assigns  the
  217.    value to the variable.
  218.  
  219.  
  220.    Examples
  221.  
  222.         The following example maps are intended to show some  of  the  pro-
  223.    grammes  capabilities.  Since they are rendered in monochrome here, ena-
  224.    bling all the features on the one map  would  be  quite  confusing.  The
  225.    enhanced  definition  available  with a color print makes this practical
  226.    however.  The following prints show:
  227.  
  228.     1.  The whole world with the compass lines and outer border.
  229.  
  230.     2.  Western Europe as it appears from Annapolis.
  231.  
  232.            - This also shows the DXCC  country  callsigns  which  are  read
  233.              directly from the ARRL file.
  234.  
  235.     3.  A regional map of the north-east US based on Newington CT.
  236.  
  237.            - This includes  both  lettered  and  numbered  Maidenhead  grid
  238.              squares.
  239.  
  240.     4.  The CONUS based on Annapolis but centered on the mid-west.
  241.  
  242.  
  243.    Conclusion
  244.  
  245.         It is hoped that this program will be of use to the amateur commun-
  246.    ity,  and we encourage its wide distribution. There are still many ideas
  247.    to be included in future versions, and with constructive  feedback  from
  248.    users, no doubt its utility will be enhanced.
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.